package com.aistar.line.mapper;

import com.aistar.line.entity.Spot;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Description: java类作用描述:景点信息的crud
 * @Author: tyg
 * @CreateDate: 2019/6/28 0028
 * @Version: 1.0
 */
public interface SpotMapper {
    /**
     * 根据景点id查询
     * @param id
     * @return
     */
    @Select("select * from spot where spot_id = #{id}")
    Spot findById(String id);

    /**
     * 根据景点名查询id
     * @param name
     * @return
     */
    @Select("select spot_id from spot where spot_name = #{name}")
    String findByName(String name);

    /**
     * 根据酒店星级查询酒店id
     * @param Star
     * @return
     */
    @Select("select hotel_id from hotel where hotel_star = #{star}")
    List<String> findByStar(String Star);
}
